package com.khyr.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.khyr.Vo.MedicinesVo;
import com.khyr.entity.Medicines;
import com.khyr.entity.StockMedicines;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @InterfaceName: MedicinesDao
 * @author: Zyl
 * @date: 2025/3/12 21:53
 * @Version: 1.0
 * @description:
 */
@Mapper
public interface MedicinesDao extends BaseMapper<StockMedicines> {
    int insert1(MedicinesVo data);

    int update1(MedicinesVo data);

    int deleteMedicinesByIds(List<Integer> medicinesIds);

    int adjustMedicinesStock(@Param("medicinesId") Integer medicinesId, @Param("medicinesStockNum") Integer medicinesStockNum);

    int update(StockMedicines m);

    int reduce(@Param("medicinesName") String medicinesName,@Param("medicinesStockNum") Integer medicinesStockNum);

    int add(@Param("medicinesId") Long medicinesId, @Param("medicinesStockNum") Integer medicinesStockNum);
}
